package com.ericpol.pageObjectPattern;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

public class PageBase {

	protected WebDriver driver;
	protected String baseUrl;
	public PageBase(WebDriver driver) {
		this.driver = driver;
	}

	protected void click(By by) {
		driver.findElement(by).click();
	}

	protected void insertText(By by, String text) {
		WebElement element = driver.findElement(by);
		element.clear();
		element.sendKeys(text);

	}

	public void open(String url) {
		driver.get(url);
	}

}
